package com.suxin.oci.mapper.other;

import com.suxin.oci.domain.internet.V4MisEn;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author Tang
 * @classname SupplyStatisticsMapper
 * @description [  ]
 * @date 2021/4/24 18:57
 */
public interface SupplyStatisticsMapper {

    @Results(id = "V4MisEn",value = {
            @Result(id = true,column = "tid",property = "id"),
            @Result(column = "tid",property = "tid"),
            @Result(column = "tName",property = "tName"),
            @Result(column = "tType",property = "tType"),
            @Result(column = "dy",property = "dy"),
            @Result(column = "dm",property = "dm"),
            @Result(column = "dd",property = "dd"),
            @Result(column = "dh",property = "dh"),
            @Result(column = "dn",property = "dn"),
            @Result(column = "temp",property = "temp"),
            @Result(column = "press",property = "press"),
            @Result(column = "flowm",property = "flowM"),
            @Result(column = "flowsumm",property = "flowSumm"),
            @Result(column = "flowsumq",property = "flowSumQ"),
            @Result(column = "pressma",property = "presSma"),
            @Result(column = "flowq",property = "flowQ"),
    })
    @Select(value = {
            "select * from V4MisEn where ttype = '供' or ttype = '用'"
    })
    List<V4MisEn> selectAllByProviderAndUse();

    @Select(value = {
            "SELECT SUM(flowsumm) as result FROM V4MisEn"
    })
    Double selectFlowSumm();
}
